<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.4.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"ckyhahaha.info","root":"/","scheme":"Gemini","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},"path":"search.xml"};
  </script>

  <meta name="description" content="弹性盒子属性和浮动属性弹性盒子：display:flex 容器的属性：flex-direction属性的四个值row（默认值）：主轴为水平方向，起点在左端 row-reverse：主轴为水平方向，起点在右端 column：主轴为垂直方向，起点在上沿  column-reverse：主轴为垂直方向，起点在下沿">
<meta property="og:type" content="article">
<meta property="og:title" content="htmlcss常用属性">
<meta property="og:url" content="https://ckyhahaha.info/2022/01/21/htmlcss%E5%B8%B8%E7%94%A8%E5%B1%9E%E6%80%A7/index.html">
<meta property="og:site_name" content="cky小站">
<meta property="og:description" content="弹性盒子属性和浮动属性弹性盒子：display:flex 容器的属性：flex-direction属性的四个值row（默认值）：主轴为水平方向，起点在左端 row-reverse：主轴为水平方向，起点在右端 column：主轴为垂直方向，起点在上沿  column-reverse：主轴为垂直方向，起点在下沿">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://ckyhahaha.info/2022/01/21/htmlcss%E5%B8%B8%E7%94%A8%E5%B1%9E%E6%80%A7/fPjPts.png">
<meta property="og:image" content="https://ckyhahaha.info/2022/01/21/htmlcss%E5%B8%B8%E7%94%A8%E5%B1%9E%E6%80%A7/fPj191.png">
<meta property="article:published_time" content="2022-01-21T12:29:38.000Z">
<meta property="article:modified_time" content="2022-01-21T12:39:10.688Z">
<meta property="article:author" content="cky">
<meta property="article:tag" content="html css">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://ckyhahaha.info/2022/01/21/htmlcss%E5%B8%B8%E7%94%A8%E5%B1%9E%E6%80%A7/fPjPts.png">

<link rel="canonical" href="https://ckyhahaha.info/2022/01/21/htmlcss%E5%B8%B8%E7%94%A8%E5%B1%9E%E6%80%A7/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>htmlcss常用属性 | cky小站</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

<link rel="alternate" href="/atom.xml" title="cky小站" type="application/atom+xml">
</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">cky小站</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
      <p class="site-subtitle" itemprop="description">记录学习知识和生活中的点点滴滴</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-about">

    <a href="/about" rel="section"><i class="fa fa-user fa-fw"></i>关于</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags" rel="section"><i class="fa fa-tags fa-fw"></i>标签<span class="badge">4</span></a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories" rel="section"><i class="fa fa-th fa-fw"></i>分类<span class="badge">4</span></a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives" rel="section"><i class="fa fa-archive fa-fw"></i>归档<span class="badge">4</span></a>

  </li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup">
        <div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off"
           placeholder="搜索..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div id="search-result">
  <div id="no-result">
    <i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>
  </div>
</div>

    </div>
  </div>

</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://ckyhahaha.info/2022/01/21/htmlcss%E5%B8%B8%E7%94%A8%E5%B1%9E%E6%80%A7/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.jpg">
      <meta itemprop="name" content="cky">
      <meta itemprop="description" content="相见恨晚">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="cky小站">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          htmlcss常用属性
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>
              

              <time title="创建时间：2022-01-21 20:29:38 / 修改时间：20:39:10" itemprop="dateCreated datePublished" datetime="2022-01-21T20:29:38+08:00">2022-01-21</time>
            </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/%E5%89%8D%E7%AB%AF%E5%9F%BA%E7%A1%80/" itemprop="url" rel="index"><span itemprop="name">前端基础</span></a>
                </span>
            </span>

          
            <span class="post-meta-item" title="阅读次数" id="busuanzi_container_page_pv" style="display: none;">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              <span class="post-meta-item-text">阅读次数：</span>
              <span id="busuanzi_value_page_pv"></span>
            </span>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <h1 id="弹性盒子属性和浮动属性"><a href="#弹性盒子属性和浮动属性" class="headerlink" title="弹性盒子属性和浮动属性"></a>弹性盒子属性和浮动属性</h1><p>弹性盒子：<code>display:flex</code></p>
<h1 id="容器的属性："><a href="#容器的属性：" class="headerlink" title="容器的属性："></a>容器的属性：</h1><h4 id="flex-direction属性的四个值"><a href="#flex-direction属性的四个值" class="headerlink" title="flex-direction属性的四个值"></a>flex-direction属性的四个值</h4><p><code>row</code>（默认值）：主轴为水平方向，起点在左端</p>
<p><code>row-reverse</code>：主轴为水平方向，起点在右端</p>
<p><code>column</code>：主轴为垂直方向，起点在上沿 </p>
<p><code>column-reverse</code>：主轴为垂直方向，起点在下沿</p>
<span id="more"></span>

<h4 id="flex-wrap属性的三个值"><a href="#flex-wrap属性的三个值" class="headerlink" title="flex-wrap属性的三个值"></a>flex-wrap属性的三个值</h4><p><code>nowrap</code>（默认）：不换行</p>
<p><code>wrap</code>：换行，第一行在上方</p>
<p><code>wrap-reverse</code>：换行，第一行在下方</p>
<p>flex-flow属性的两个值</p>
<p>flex-flow: flex-direction – flex-wrap</p>
<h4 id="justify-content属性的五个值"><a href="#justify-content属性的五个值" class="headerlink" title="justify-content属性的五个值"></a>justify-content属性的五个值</h4><p><code>flex-start</code>（默认值）：左对齐</p>
<p><code>flex-end</code>：右对齐</p>
<p><code>center</code>： 居中</p>
<p><code>space-between</code>：两端对齐，项目之间的间隔都相等。</p>
<p><code>space-around</code>：每个项目两侧的间隔相等。所以，项目之间的间隔比项目与边框的间隔大一倍</p>
<h4 id="align-items属性的五个值"><a href="#align-items属性的五个值" class="headerlink" title="align-items属性的五个值"></a>align-items属性的五个值</h4><p><code>flex-start</code>：交叉轴的起点对齐</p>
<p><code>flex-end</code>：交叉轴的终点对齐</p>
<p><code>center</code>：交叉轴的中点对齐</p>
<p><code>baseline</code>: 项目的第一行文字的基线对齐</p>
<p><code>stretch</code>（默认值）：如果项目未设置高度或设为auto，将占满整个容器的高度</p>
<h4 id="align-content属性的六个值"><a href="#align-content属性的六个值" class="headerlink" title="align-content属性的六个值"></a>align-content属性的六个值</h4><p><code>flex-start</code>：与交叉轴的起点对齐</p>
<p><code>flex-end</code>：与交叉轴的终点对齐</p>
<p><code>center</code>：与交叉轴的中点对齐</p>
<p><code>space-between</code>：与交叉轴两端对齐，轴线之间的间隔平均分布</p>
<p><code>space-around</code>：每根轴线两侧的间隔都相等。所以，轴线之间的间隔比轴线与边框的间隔大一倍</p>
<p><code>stretch</code>（默认值）：轴线占满整个交叉轴</p>
<h1 id="六个项目属性"><a href="#六个项目属性" class="headerlink" title="六个项目属性:"></a>六个项目属性:</h1><p>1.<code>order</code>属性定义项目的排列顺序。数值越小，排列越靠前，默认为0</p>
<p>2.<code>flex-grow</code>属性定义项目的放大比例，默认为<code>0</code>，即如果存在剩余空间，也不放大</p>
<p>3.<code>flex-shrink</code>属性定义了项目的缩小比例，默认为1，即如果空间不足，该项目将缩小</p>
<p>4.<code>flex-basis</code>属性定义了在分配多余空间之前，项目占据的主轴空间（main size）。浏览器根据这个属性，计算主轴是否有多余空间。它的默认值为<code>auto</code>，即项目的本来大小</p>
<p>5.<code>flex</code>属性是<code>flex-grow</code>, <code>flex-shrink</code> 和 <code>flex-basis</code>的简写，默认值为<code>0 1 auto</code>。后两个属性可选</p>
<p>6.<code>align-self</code>属性允许单个项目有与其他项目不一样的对齐方式，可覆盖<code>align-items</code>属性。默认值为<code>auto</code>，表示继承父元素的<code>align-items</code>属性，如果没有父元素，则等同于`stretch</p>
<h1 id="float属性的值"><a href="#float属性的值" class="headerlink" title="float属性的值"></a><strong>float属性的值</strong></h1><p><code>float;left</code> 元素向左浮动<br><code>float:right</code> 元素向右浮动<br><code>float:none</code> 默认值。元素不浮动，并会显示在其在文本中出现的位置<br><code>float:inherit</code> 规定应该从父元素继承 float 属性的值</p>
<h1 id="盒子的定位以及居中"><a href="#盒子的定位以及居中" class="headerlink" title="盒子的定位以及居中"></a>盒子的定位以及居中</h1><h2 id="定位position"><a href="#定位position" class="headerlink" title="定位position"></a>定位position</h2><h4 id="1-static"><a href="#1-static" class="headerlink" title="1.static"></a>1.<code>static</code></h4><p><code>positon</code>定位的默认值，没有定位</p>
<h4 id="2-relative"><a href="#2-relative" class="headerlink" title="2.relative"></a>2.<code>relative</code></h4><p>生成相对定位的元素，相对于其正常位置进行定位，一般在子元素设置absoute定位时，给父元素设置relative</p>
<p>元素的位置通过top、right、bottom、left  控制，其值的定位起点都是是父元素左上角(这点和<code>absoute</code>、<code>fixed</code>不一样)</p>
<h4 id="3-absoute"><a href="#3-absoute" class="headerlink" title="3.absoute"></a>3.<code>absoute</code></h4><p>生成绝对定位的元素，相对于 static 定位以外的第一个父元素进行定位</p>
<p>元素的位置通过top、right、bottom、left  控制，top、left的定位起点是包含块左上角，right、bottom的定位起点是包含块右下角</p>
<h4 id="4-fixed-（ie6不兼容）"><a href="#4-fixed-（ie6不兼容）" class="headerlink" title="4.fixed  （ie6不兼容）"></a>4.<code>fixed</code>  （<code>ie6</code>不兼容）</h4><p>生成绝对定位的元素，相对于浏览器窗口进行定位，和<code>absoute</code>的区别是fixed不会跟随屏幕滚动(常见的各种贴屏广告)</p>
<p>元素的位置通过top、right、bottom、left  控制，top、left的定位起点是包含块左上角，right、bottom的定位起点是包含块右下角</p>
<h4 id="5-sticky"><a href="#5-sticky" class="headerlink" title="5. sticky"></a><strong>5. sticky</strong></h4><p><code>css3</code>新属性，它的表现就像<code>position:relative</code>和<code>position:fixed</code>的合体</p>
<p>1.设置了 sticky属性的盒子在目标区域在屏幕中可见时，它的行为就像<code>position:relative</code></p>
<p>2.当页面滚动时</p>
<p>当父元素是body时 </p>
<p>  a.滚动距离小于屏幕高度或宽度，它会固定在目标位置</p>
<p>  b.滚动距离大于屏幕高度或宽度，它的表现就像<code>position:relative</code>一样</p>
<p>当父元素不是body，在父元素高度内滚动时它会固定在目标位置，就像fixed</p>
<h3 id="6-z-index属性一个参数"><a href="#6-z-index属性一个参数" class="headerlink" title="6. z-index属性一个参数"></a>6. z-index属性一个参数</h3><p>z-index:层级关系的值</p>
<p>(注释：设置了定位的条件下，当元素之间重叠的时候， z-index 较大的元素会覆盖较小的元素在上层进行显示)</p>
<h1 id="盒子居中"><a href="#盒子居中" class="headerlink" title="盒子居中"></a>盒子居中</h1><h4 id="盒子里的文字居中："><a href="#盒子里的文字居中：" class="headerlink" title="盒子里的文字居中："></a>盒子里的文字居中：</h4><p>行高属性有一个参数：line-height: 根据盒子的高设置相应的像素</p>
<p>水平居中属性有一个参数：text-align: 根据盒子的宽设置相应的像素</p>
<h4 id="盒子的居中："><a href="#盒子的居中：" class="headerlink" title="盒子的居中："></a>盒子的居中：</h4><p>1.通过定位居中：</p>
<p><a target="_blank" rel="noopener" href="https://imgtu.com/i/fPjPts"><img src="/2022/01/21/htmlcss%E5%B8%B8%E7%94%A8%E5%B1%9E%E6%80%A7/fPjPts.png" alt="fPjPts.png"></a></p>
<p>2.通过弹性盒子居中</p>
<p><a target="_blank" rel="noopener" href="https://imgtu.com/i/fPj191"><img src="/2022/01/21/htmlcss%E5%B8%B8%E7%94%A8%E5%B1%9E%E6%80%A7/fPj191.png" alt="fPj191.png"></a></p>
<h1 id="盒子的样式处理"><a href="#盒子的样式处理" class="headerlink" title="盒子的样式处理"></a>盒子的样式处理</h1><h3 id="1-cursor属性有一个参数"><a href="#1-cursor属性有一个参数" class="headerlink" title="1. cursor属性有一个参数"></a>1. cursor属性有一个参数</h3><p><code>cursor:鼠标的类型</code></p>
<h3 id="2-text-decoration属性有一个参数"><a href="#2-text-decoration属性有一个参数" class="headerlink" title="2. text-decoration属性有一个参数"></a>2. text-decoration属性有一个参数</h3><p><code>text-decoration：文本的修饰类型</code></p>
<h3 id="3-outline属性三个参数"><a href="#3-outline属性三个参数" class="headerlink" title="3. outline属性三个参数"></a>3. outline属性三个参数</h3><p><code>outline：边框的像素值--边框的样式--边框的颜色</code></p>
<h3 id="4-outline属性两个参数"><a href="#4-outline属性两个参数" class="headerlink" title="4. outline属性两个参数"></a>4. outline属性两个参数</h3><p><code>outline：边框的像素值--边框的样式/边框的颜色--边框的样式</code></p>
<h3 id="5-outline属性一个参数"><a href="#5-outline属性一个参数" class="headerlink" title="5. outline属性一个参数"></a>5. outline属性一个参数</h3><p><code>outline：边框的样式</code></p>
<h3 id="6-overflow属性一个参数"><a href="#6-overflow属性一个参数" class="headerlink" title="6. overflow属性一个参数"></a>6. overflow属性一个参数</h3><p><code>overflow：盒子的内容属性</code></p>
<h3 id="7-line-height属性一个参数"><a href="#7-line-height属性一个参数" class="headerlink" title="7. line-height属性一个参数"></a>7. line-height属性一个参数</h3><p><code>line-height：行间的距离（行高）</code></p>
<h3 id="8-text-align属性一个参数"><a href="#8-text-align属性一个参数" class="headerlink" title="8. text-align属性一个参数"></a>8. text-align属性一个参数</h3><p><code>text-align:元素中的文本的水平对齐方式</code></p>
<h3 id="9-box-sizing盒子模型"><a href="#9-box-sizing盒子模型" class="headerlink" title="9. box-sizing盒子模型"></a>9. box-sizing盒子模型</h3><p>1.怪异盒模型</p>
<p><code>box-sizing: border-box</code></p>
<p>盒子的<strong>width</strong>指的是内容、边框、内边距总的宽度</p>
<p>盒子的<strong>height</strong>指的是内容、边框、内边距总的高度</p>
<p>2.标准盒模型</p>
<p><code>box-sizing: content-box</code></p>
<p>盒子的<strong>width</strong>指的是内容区域<strong>content</strong>的宽度</p>
<p>盒子的<strong>height</strong>指的是内容区域<strong>content</strong>的高度</p>
<h1 id="基本的盒子属性设置"><a href="#基本的盒子属性设置" class="headerlink" title="基本的盒子属性设置"></a>基本的盒子属性设置</h1><p>内边距：padding</p>
<p>内边距四个参数：padding：上–右–下–左</p>
<p>内边距两个参数：padding：上下–左右 </p>
<p>外边距：margin</p>
<p>外边距四个参数：padding：上–右–下–左</p>
<p>外边距两个参数：padding：上下–左右 </p>
<p>设置行内块元素：display: inline-block</p>
<p>设置行内元素：display: inline</p>
<p>设置块级元素：display:block</p>
<p>隐藏/显示属性：display:none/block</p>
<p>边框属性：border</p>
<p>边框属性的三个参数：border：像素值 样式  颜色</p>
<p>圆角变框：border-radius</p>
<p>圆角变框四个参数：border-radius：上–右–下–左</p>
<p>圆角变框两个参数：border-radius：左上右下–左下右上</p>
<p>字体大小设置：font-size</p>
<p>字体粗细设置：font-weight</p>
<p>字体类型设置：font-family</p>
<p>背景属性：background;</p>
<p>背景颜色：background-color </p>
<p>背景图片：background-image</p>
<p>背景定位：background-position</p>
<p>背景定位两个参数：background-position：X轴–Y轴</p>
<p>背景是否重复：background-repeat</p>
<p>背景大小：background-size</p>
<p>背景大小两个参数：background-size:宽–高</p>
<p>背景大小一个参数：background-size:宽高</p>
<h2 id="字体样式处理"><a href="#字体样式处理" class="headerlink" title="字体样式处理"></a>字体样式处理</h2><h4 id="两行显示，溢出省略号"><a href="#两行显示，溢出省略号" class="headerlink" title="两行显示，溢出省略号"></a>两行显示，溢出省略号</h4><p> text-overflow: ellipsis;   （溢出省略号）</p>
<p> display: -webkit-box;    （块容器）</p>
<p> -webkit-line-clamp: 2;    （限定内容为2行）</p>
<p> -webkit-box-orient: vertical;    （内容垂直布局）</p>
<p> display: -moz-box;</p>
<p> -moz-line-clamp: 2;</p>
<p> -moz-box-orient: vertical;    </p>
<p> word-wrap: break-word;   （强制分割字符）</p>
<p> word-break: break-all;    （多种语言的断点）</p>
<p> white-space: normal;  （去除空格）</p>
<p> overflow: hidden;    （溢出隐藏）</p>

    </div>

    
    
    
        

  <div class="followme">
    <p>欢迎关注我的其它发布渠道</p>

    <div class="social-list">

        <div class="social-item">
          <a target="_blank" class="social-link" href="/atom.xml">
            <span class="icon">
              <i class="fa fa-rss"></i>
            </span>

            <span class="label">RSS</span>
          </a>
        </div>
    </div>
  </div>


      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/html-css/" rel="tag"># html css</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/2022/01/21/text/" rel="prev" title="迷吊灯灯又一天">
      <i class="fa fa-chevron-left"></i> 迷吊灯灯又一天
    </a></div>
      <div class="post-nav-item">
    <a href="/2022/01/22/jenkins-hexo%E6%90%AD%E5%BB%BA%E5%8D%9A%E5%AE%A2/" rel="next" title="jenkins+hexo搭建博客">
      jenkins+hexo搭建博客 <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#%E5%BC%B9%E6%80%A7%E7%9B%92%E5%AD%90%E5%B1%9E%E6%80%A7%E5%92%8C%E6%B5%AE%E5%8A%A8%E5%B1%9E%E6%80%A7"><span class="nav-number">1.</span> <span class="nav-text">弹性盒子属性和浮动属性</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E5%AE%B9%E5%99%A8%E7%9A%84%E5%B1%9E%E6%80%A7%EF%BC%9A"><span class="nav-number">2.</span> <span class="nav-text">容器的属性：</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#flex-direction%E5%B1%9E%E6%80%A7%E7%9A%84%E5%9B%9B%E4%B8%AA%E5%80%BC"><span class="nav-number">2.0.0.1.</span> <span class="nav-text">flex-direction属性的四个值</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#flex-wrap%E5%B1%9E%E6%80%A7%E7%9A%84%E4%B8%89%E4%B8%AA%E5%80%BC"><span class="nav-number">2.0.0.2.</span> <span class="nav-text">flex-wrap属性的三个值</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#justify-content%E5%B1%9E%E6%80%A7%E7%9A%84%E4%BA%94%E4%B8%AA%E5%80%BC"><span class="nav-number">2.0.0.3.</span> <span class="nav-text">justify-content属性的五个值</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#align-items%E5%B1%9E%E6%80%A7%E7%9A%84%E4%BA%94%E4%B8%AA%E5%80%BC"><span class="nav-number">2.0.0.4.</span> <span class="nav-text">align-items属性的五个值</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#align-content%E5%B1%9E%E6%80%A7%E7%9A%84%E5%85%AD%E4%B8%AA%E5%80%BC"><span class="nav-number">2.0.0.5.</span> <span class="nav-text">align-content属性的六个值</span></a></li></ol></li></ol></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E5%85%AD%E4%B8%AA%E9%A1%B9%E7%9B%AE%E5%B1%9E%E6%80%A7"><span class="nav-number">3.</span> <span class="nav-text">六个项目属性:</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#float%E5%B1%9E%E6%80%A7%E7%9A%84%E5%80%BC"><span class="nav-number">4.</span> <span class="nav-text">float属性的值</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E7%9B%92%E5%AD%90%E7%9A%84%E5%AE%9A%E4%BD%8D%E4%BB%A5%E5%8F%8A%E5%B1%85%E4%B8%AD"><span class="nav-number">5.</span> <span class="nav-text">盒子的定位以及居中</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%9A%E4%BD%8Dposition"><span class="nav-number">5.1.</span> <span class="nav-text">定位position</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#1-static"><span class="nav-number">5.1.0.1.</span> <span class="nav-text">1.static</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2-relative"><span class="nav-number">5.1.0.2.</span> <span class="nav-text">2.relative</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#3-absoute"><span class="nav-number">5.1.0.3.</span> <span class="nav-text">3.absoute</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#4-fixed-%EF%BC%88ie6%E4%B8%8D%E5%85%BC%E5%AE%B9%EF%BC%89"><span class="nav-number">5.1.0.4.</span> <span class="nav-text">4.fixed  （ie6不兼容）</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#5-sticky"><span class="nav-number">5.1.0.5.</span> <span class="nav-text">5. sticky</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#6-z-index%E5%B1%9E%E6%80%A7%E4%B8%80%E4%B8%AA%E5%8F%82%E6%95%B0"><span class="nav-number">5.1.1.</span> <span class="nav-text">6. z-index属性一个参数</span></a></li></ol></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E7%9B%92%E5%AD%90%E5%B1%85%E4%B8%AD"><span class="nav-number">6.</span> <span class="nav-text">盒子居中</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#%E7%9B%92%E5%AD%90%E9%87%8C%E7%9A%84%E6%96%87%E5%AD%97%E5%B1%85%E4%B8%AD%EF%BC%9A"><span class="nav-number">6.0.0.1.</span> <span class="nav-text">盒子里的文字居中：</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#%E7%9B%92%E5%AD%90%E7%9A%84%E5%B1%85%E4%B8%AD%EF%BC%9A"><span class="nav-number">6.0.0.2.</span> <span class="nav-text">盒子的居中：</span></a></li></ol></li></ol></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E7%9B%92%E5%AD%90%E7%9A%84%E6%A0%B7%E5%BC%8F%E5%A4%84%E7%90%86"><span class="nav-number">7.</span> <span class="nav-text">盒子的样式处理</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#1-cursor%E5%B1%9E%E6%80%A7%E6%9C%89%E4%B8%80%E4%B8%AA%E5%8F%82%E6%95%B0"><span class="nav-number">7.0.1.</span> <span class="nav-text">1. cursor属性有一个参数</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#2-text-decoration%E5%B1%9E%E6%80%A7%E6%9C%89%E4%B8%80%E4%B8%AA%E5%8F%82%E6%95%B0"><span class="nav-number">7.0.2.</span> <span class="nav-text">2. text-decoration属性有一个参数</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#3-outline%E5%B1%9E%E6%80%A7%E4%B8%89%E4%B8%AA%E5%8F%82%E6%95%B0"><span class="nav-number">7.0.3.</span> <span class="nav-text">3. outline属性三个参数</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#4-outline%E5%B1%9E%E6%80%A7%E4%B8%A4%E4%B8%AA%E5%8F%82%E6%95%B0"><span class="nav-number">7.0.4.</span> <span class="nav-text">4. outline属性两个参数</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#5-outline%E5%B1%9E%E6%80%A7%E4%B8%80%E4%B8%AA%E5%8F%82%E6%95%B0"><span class="nav-number">7.0.5.</span> <span class="nav-text">5. outline属性一个参数</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#6-overflow%E5%B1%9E%E6%80%A7%E4%B8%80%E4%B8%AA%E5%8F%82%E6%95%B0"><span class="nav-number">7.0.6.</span> <span class="nav-text">6. overflow属性一个参数</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#7-line-height%E5%B1%9E%E6%80%A7%E4%B8%80%E4%B8%AA%E5%8F%82%E6%95%B0"><span class="nav-number">7.0.7.</span> <span class="nav-text">7. line-height属性一个参数</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#8-text-align%E5%B1%9E%E6%80%A7%E4%B8%80%E4%B8%AA%E5%8F%82%E6%95%B0"><span class="nav-number">7.0.8.</span> <span class="nav-text">8. text-align属性一个参数</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#9-box-sizing%E7%9B%92%E5%AD%90%E6%A8%A1%E5%9E%8B"><span class="nav-number">7.0.9.</span> <span class="nav-text">9. box-sizing盒子模型</span></a></li></ol></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E5%9F%BA%E6%9C%AC%E7%9A%84%E7%9B%92%E5%AD%90%E5%B1%9E%E6%80%A7%E8%AE%BE%E7%BD%AE"><span class="nav-number">8.</span> <span class="nav-text">基本的盒子属性设置</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AD%97%E4%BD%93%E6%A0%B7%E5%BC%8F%E5%A4%84%E7%90%86"><span class="nav-number">8.1.</span> <span class="nav-text">字体样式处理</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#%E4%B8%A4%E8%A1%8C%E6%98%BE%E7%A4%BA%EF%BC%8C%E6%BA%A2%E5%87%BA%E7%9C%81%E7%95%A5%E5%8F%B7"><span class="nav-number">8.1.0.1.</span> <span class="nav-text">两行显示，溢出省略号</span></a></li></ol></li></ol></li></ol></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="cky"
      src="/images/avatar.jpg">
  <p class="site-author-name" itemprop="name">cky</p>
  <div class="site-description" itemprop="description">相见恨晚</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives">
        
          <span class="site-state-item-count">4</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories">
          
        <span class="site-state-item-count">4</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags">
          
        <span class="site-state-item-count">4</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        
  <div class="beian"><a href="https://beian.miit.gov.cn/" rel="noopener" target="_blank">粤ICP备2021147162号-1 </a>
  </div>

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2022</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">cky</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Gemini</a> 强力驱动
  </div>

        
<div class="busuanzi-count">
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
    <span class="post-meta-item" id="busuanzi_container_site_uv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-user"></i>
      </span>
      <span class="site-uv" title="总访客量">
        <span id="busuanzi_value_site_uv"></span>
      </span>
    </span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item" id="busuanzi_container_site_pv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-eye"></i>
      </span>
      <span class="site-pv" title="总访问量">
        <span id="busuanzi_value_site_pv"></span>
      </span>
    </span>
</div>








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/pisces.js"></script>


<script src="/js/next-boot.js"></script>




  




  
<script src="/js/local-search.js"></script>













  

  

</body>
</html>
